/**
 * 👨‍💻 伟谭
 * 📅 2017/11/27
 */

#import "TWConvenienceServiceDetailsOfServicesProvidedCollectionViewCell.h"

@interface TWConvenienceServiceDetailsOfServicesProvidedCollectionViewCell()

//头像
@property(nonatomic,strong) UIImageView *imageViewHeader;

//标题
@property(nonatomic,strong) UILabel * lblTitle;

//价格
@property(nonatomic,strong) UILabel * lblPrice;


@end

@implementation TWConvenienceServiceDetailsOfServicesProvidedCollectionViewCell

#pragma mark - Class method

#pragma mark - Life cycle

#pragma mark - Override
-(instancetype)initWithFrame:(CGRect)frame {
    
    if(self){
    
        self = [super initWithFrame:frame];
        self.backgroundColor = [UIColor whiteColor];
        
        UIImageView *imageViewHeader = [UIImageView new];
        imageViewHeader.image = [UIImage imageWithColor:randomColor size:CGSizeMake(2.0f, 2.0f)];
        [self.contentView addSubview:imageViewHeader];
        _imageViewHeader = imageViewHeader;
        
        UILabel * lblTitle = [UILabel hj_labelWithText:@"开锁服务" textColor:nil font:FontB(12.0f)];
        [self.contentView addSubview:lblTitle];
        _lblTitle = lblTitle;
  
        UILabel * lblPrice = [UILabel hj_labelWithText:@"￥50.00" textColor:[UIColor redColor] font:FontL(11.0f)];
        
        lblPrice.attributedText = [NSAttributedString ls_changeFontAndColor:FontL(8.0f) Color:nil TotalString:@"￥50.00" SubStringArray:@[@"￥"]];
        
        [self.contentView addSubview:lblPrice];
        _lblPrice = lblPrice;
        
        
        [imageViewHeader mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.offset(5.0f);
            make.left.right.offset(0.0f);
            make.height.equalTo(imageViewHeader.mas_width).multipliedBy(1.0f);
        }];
        
        [lblTitle mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(imageViewHeader);
            make.top.equalTo(imageViewHeader.mas_bottom).offset(4.0f);
        }];
        
        [lblPrice mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(imageViewHeader);
            make.top.equalTo(lblTitle.mas_bottom).offset(2.0f);
        }];
        
        
        

    }
    
    return self;
}

#pragma mark - Event response

#pragma mark - Protocol

#pragma mark <<#XXXDelegate#>>

#pragma mark - Public method

#pragma mark - Private method

#pragma mark - Getter & Setter

@end
